package com.rabbit.eap.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rabbit.eap.system.entity.SysUser;
import com.rabbit.eap.system.entity.SysUserDept;
import com.rabbit.eap.system.param.SysUserPageParam;
import com.rabbit.eap.system.vo.SysUserVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.List;

/**
 * @projectName eap
 * @packageName com.rabbit.eap.system.mapper
 * @className SysUserMapper
 * @author： rabbit
 * @version： 1.0
 * @since： 2020/06/06 23:34:03
 * <p>Description:
 * 用户信息表 Mapper 接口
 * </p>

 */
@Repository
public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 根据ID获取查询对象
     *
     * @param id
     * @return
     */
    SysUserVO getSysUserById(Serializable id);

    /**
     * 获取分页对象
     *
     * @param page
     * @param sysUserPageParam
     * @return
     */
    IPage<SysUserVO> getSysUserPageList(Page page, @Param("param") SysUserPageParam sysUserPageParam);

    List<SysUserDept> getSysUserDept(@Param("userId") Long id);
}
